import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'dayjs/locale/zh-cn'
import locale from 'element-plus/es/locale/lang/zh-cn';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import '@/styles/main.scss';
import './permisstion.ts';
//引入路由
import router from '@/router'
//引入存储
import pinia from '@/store'
import App from './App.vue'

const app = createApp(App)
//安装element-plus插件
app.use(ElementPlus, {
    locale: zhCn, //element-plus国际化配置
})
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(pinia)
app.use(router)
app.use(ElementPlus,{locale})
app.mount('#app')
